package com.songlanyun.modules.pointconfig.model.dto;

import com.songlanyun.common.drive.ValueObject;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.math.BigDecimal;

@Data
public class PointConfigDto implements ValueObject {
    /**
     * 积分价格
     */
    @DecimalMax(value= "999999.00",message = "积分价格最大是999999.00")
    @DecimalMin(value= "0.01",message = "积分价格最小是0.01")
    private BigDecimal pointPrice;
    /**
     * 转赠手续费比率
     */
    @DecimalMax(value= "100.00",message = "转赠手续费比率最大是100.00%")
    @DecimalMin(value= "0.01",message = "转赠手续费比率最小是0.01%")
    private BigDecimal giveAwayHandlingFeeRatio;

    @DecimalMax(value= "100.00",message = "提现手续费比率最大是100.00%")
    @DecimalMin(value= "0.01",message = "提现手续费比率最小是0.01%")
    private BigDecimal withdrawHandlingFeeRatio;

    @DecimalMax(value= "100.00",message = "提现手续费比率最大是100.00%")
    @DecimalMin(value= "0.01",message = "提现手续费比率最小是0.01%")
    private BigDecimal balanceToPointHandlingFeeRatio;
    /**
     * 激活周期天数
     */
    @Min(value = 1, message = "激活周期天数最小为1")
    @Max(value = 365, message = "激活周期天数最小为365")
    private Integer activationPeriodDay;

    /**
     * 注册送贡献值
     */
    @DecimalMax(value= "999999.00",message = "贡献值最大是999999.00")
    @DecimalMin(value= "0.01",message = "贡献值最小是0.01")
    private BigDecimal  registerGiveConsumption;

    /**
     * 是否开启空投
     */
    private Boolean openPutIn = true;
    /**
     * 操作的管理员
     */
    private String adminUsername;
}
